﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace App_Clinique.ClassLibrary.Entities
{
    [Serializable]
    public partial class Ordonnance : Document
    {
        public Ordonnance()
        {
            this.DateOrdonnance = DateTime.Now.Date;
        }

        [Column("DateOrdonnance"), Required]
        public virtual DateTime DateOrdonnance { get; set; }

        /****************************************************************************************************
         * Foreign Keys - IDs
         ***************************************************************************************************/
        [Column("Ordonnance_DossierMedicalID", Order = 4)]
        public virtual Nullable<Guid> DossierMedicalID { get; set; }

        [Column("ConsultationID", Order = 5)]
        public virtual Guid ConsultationID { get; set; }

        /****************************************************************************************************
         * Foreign Keys - Reference Objects
         ***************************************************************************************************/
        public virtual DossierMedical DossierMedical { get; set; }
        public virtual Consultation Consultation { get; set; }

        /****************************************************************************************************
         * Collections
         ***************************************************************************************************/
        public virtual ICollection<OrdonnancesMedicaments> OrdonnancesMedicaments { get; set; }
    }
}